from django.db import models
from tower.models import *

#职务
class Duty(models.Model):

    duty_name = models.CharField(max_length = 200)


# 用户
class User(models.Model):
    #关联职务
    duty = models.ForeignKey(Duty,on_delete = models.CASCADE)
    #账号
    user_account = models.CharField(max_length = 200)
    #密码
    user_password = models.CharField(max_length = 200)
    #名字
    user_name = models.CharField(max_length = 200)
    #性别
    user_sex = models.CharField(max_length = 8)
    #身份证
    user_identity = models.CharField(max_length = 200)
    #手机号
    user_phone = models.IntegerField(blank = True,null = True)
    #入职日期
    user_date = models.DateTimeField(auto_now_add = True)
    #工作状态(分在职.离职两种 True为在职,离职改为False,默认是True)
    user_status = models.BooleanField(default = True)
